/**
 * 
 */

package com.shy.portal.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.shy.base.service.impl.BaseServiceImpl;
import com.shy.portal.dao.PermissionDao;
import com.shy.portal.entity.Permission;
import com.shy.portal.service.PermissionService;

/**
 * <p>
 * Title: PermissionServiceImpl
 * </p>
 * <p>
 * Description:权限管理service层实现
 * </p>
 * <p>
 * Company:ipebg
 * </p>
 * 
 * @author H2013788
 */
@Transactional
@Service("permissionService")
public class PermissionServiceImpl extends BaseServiceImpl<Permission> implements PermissionService {

    /**
     * 权限dao
     */
    @Resource
    private PermissionDao permissionDao;

    /**
     * 
     * @param permissionDao 权限dao
     * @author H2201965
     * @date 2018/2/6下午3:42:25
     */
    @Resource
    private void setBaseDao(PermissionDao permissionDao) {
        this.baseDao = permissionDao;
    }

    @Override
    public int getMaxLevel() {
        return permissionDao.getMaxLevel();
    }

    @Override
    public List<Permission> getPermissionsByRoleId(Integer roleId) {
        return permissionDao.getPermissionsByRoleId(roleId);
    }

}
